package com.cskaoyan.market.service.impl;

import com.cskaoyan.market.db.domain.MarketRole;
import com.cskaoyan.market.db.domain.MarketRoleExample;
import com.cskaoyan.market.db.mapper.MarketRoleMapper;
import com.cskaoyan.market.service.AdminRoleService;
import com.cskaoyan.market.util.MybatisUtils;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * @author:yanzijun
 * @time:2024/06/18/22:34
 */
public class AdminRoleServiceImpl implements AdminRoleService {
    @Override
    public List<MarketRole> options() {
        SqlSession session = MybatisUtils.getSession();
        MarketRoleMapper mapper = session.getMapper(MarketRoleMapper.class);
        List<MarketRole> marketRoles = mapper.selectByExample(new MarketRoleExample());
        session.close();
        return marketRoles;
    }
}
